﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;
using DTO;

namespace DoAn
{
    public partial class frXemHoaDon : Form
    {
        public frXemHoaDon()
        {
            InitializeComponent();
        }
        public frXemHoaDon(string MaHD):this()
        {
            HoaDonDTO hd = new HoaDonDTO();
            HoaDonBUS bus = new HoaDonBUS();
            hd = bus.LayHoaDonTheoMa(MaHD);
            lbMaHD.Text = hd.MaHoaDon;
            lbNV.Text = hd.MaNV;
            lbKH.Text = hd.MaKH;
            lbSoPhieuXuat.Text = hd.SoPhieuXuat;
            lbTongGT.Text = hd.TongGiaTri.ToString();
            lbNgayTT.Text = hd.NgayThanhToan.ToString();
            lbGhiChu.Text = hd.GhiChu;
        }

        private void btnDong_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btnCapNhat_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btnXoa_Click(object sender, EventArgs e)
        {
            Close();            
        }

    }
}
